package com.example.ruiji.service.article;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.example.ruiji.pojo.Article;
import com.example.ruiji.utils.vo.Result;
import com.example.ruiji.utils.vo.param.ArticleVo;
import com.example.ruiji.utils.vo.param.PageParam;
import org.apache.ibatis.annotations.Param;

/**
 * Author:BaiYiChen
 * Date:2022/4/19 21:48
 *
 * @author BaiYiChen
 */

public interface ArticleService {
  /**
   * 分页博客
   * @param param
   * @return
   */
  Result listArticle(PageParam param);
  Result hotArticle(Integer limit);
  Long articleCnt();
  Result recentlyPublished(Integer limit);
  Result articleArch();
  ArticleVo findArticleById(Integer id);
  Integer insertArticle(Article article);
  Result listArticleById(Integer id,PageParam param);
  Result listArticleByCategory(Integer id);
  Result listArticleByTag(Integer id,PageParam param);
  Long listArticleCountByTag(Integer id);
  Result findByDate(PageParam param,String date);
  Long listArticleCountByDate(String date);
}
